﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SimpleSaas.Web.Common
/// <summary>
/// 版 本 钢易智企2.0 V 2.0.0 钢易智企2.0
/// Copyright (c) 2023 杭州钢易科技有限公司
/// 创建人：曾东明
/// 日 期：2024
/// 描 述：
/// </summary>
{
	public class TokenInfo
	{
		public TokenInfo()
		{
			IsConfirmLogin = false;
		}
		/// <summary>
		/// 刷新token
		/// </summary>
		public string RefreshToken { get; set; }
		public string AccessToken { get; set; }
		/// <summary>
		/// 过期时间
		/// </summary>
		public DateTime ExprieTime { get; set; }
		/// <summary>
		/// 刷新token过期时间
		/// </summary>
		public DateTime RefreshTokenExprieTime { get; set; }
		/// <summary>
		/// 标记是否确认登录
		/// </summary>
		public bool IsConfirmLogin { get; set; }

		public void SetRefeshTokenExprieTime()
		{
			RefreshTokenExprieTime = DateTime.Now.AddDays(reExprieDay);
		}
		private const int reExprieDay = 15;
	}
}